The value of the variable disappears after exiting the then block (typescript React)

visit shbcf.ru